using UnityEngine;
using UnityEngine.UI;

namespace CGF
{
    public class Device : MonoBehaviour
    {
        public FramesPlayer bgExp, bgPro, bgUlt;
        public Image typeImg;
        public Text day;

        public void SetInfo(int type, int days, bool play)
        {
            bgExp.gameObject.SetActive(type == 1);
            bgPro.gameObject.SetActive(type == 2);
            bgUlt.gameObject.SetActive(type == 3);
            bgExp.enabled = play;
            bgPro.enabled = play;
            bgUlt.enabled = play;
            typeImg.sprite = typeImg.gameObject.Get<Sprite>(type - 1);
            day.text = days.ToString();
        }
    }
}
